entry: Fix undershoot position
authorTimm Bäder <mail@baedert.org>
Wed, 28 Jun 2017 05:46:46 +0000 (07:46 +0200)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 20 Jul 2017 01:27:15 +0000 (21:27 -0400)
gtk/gtkentry.c

index d0512711b1b1981eff2db04a3bd23af3c3d02ee2..5b04ef7117f2278cbeae478cc1d8ded414b06832 100644 (file)
@@ -3194,7 +3194,6 @@ gtk_entry_draw_undershoot (GtkEntry    *entry,
   GtkEntryPrivate *priv = entry->priv;
   GtkStyleContext *context;
   gint min_offset, max_offset;
-  GtkAllocation allocation;
   GdkRectangle rect;
   gboolean rtl;
 
@@ -3204,9 +3203,6 @@ gtk_entry_draw_undershoot (GtkEntry    *entry,
   gtk_entry_get_scroll_limits (entry, &min_offset, &max_offset);
 
   gtk_entry_get_text_allocation (entry, &rect);
-  gtk_widget_get_allocation (GTK_WIDGET (entry), &allocation);
-  rect.x -= allocation.x;
-  rect.y -= allocation.y;
 
   if (priv->scroll_offset > min_offset)
     {
@@ -3490,7 +3486,7 @@ gtk_entry_event (GtkWidget *widget,
       GtkAllocation icon_alloc;
       if (priv->icons[i])
         {
-          gtk_widget_get_allocation (priv->icons[i]->widget, &icon_alloc);
+          gtk_widget_get_outer_allocation (priv->icons[i]->widget, &icon_alloc);
 
           if (gdk_rectangle_contains_point (&icon_alloc, (int)x, (int)y))
             {